import 'package:flower/config/nav_key.dart';
import 'package:flower/provider/cart_model.dart';
import 'package:flower/routers/router.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'provider/address_model.dart'; // 导入 GuidePage 文件

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (_) => CartModel()),
        ChangeNotifierProvider(create: (_) => AddressModel()),
      ],
      child: MaterialApp(
        title: 'Flower',
        navigatorKey: NavKey.navKey,
        debugShowCheckedModeBanner: false, // 移除 DEBUG 标签
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        initialRoute: '/',
        onGenerateRoute: routeGenerator,
      )
    );
  }
}